package org.sys.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.sys.dao.IMenuDao;
import org.sys.vo.Menu;

@Service
public class MenuService {

	@Autowired
	private IMenuDao iMenuDao;
	
	public List<Menu> getAllMenu(String userId){
		List<Menu> list = iMenuDao.selectAllMenu(userId); 
		return list;
	}
	
	public List<Menu> getSubMenu(String userId, String parentMenu){
		List<Menu> list = iMenuDao.selectSubMenu(userId, parentMenu);
		return list;
	}
	
	public Menu getOneMenu(String menuId){
		return iMenuDao.selectOneMenu(menuId);
	}
}
